Repository navigation
release: 2.4.0 - #498
Merged
Merged
release: 2.4.0#498
Conversation
…ration) Tri ancien/nouveau des issues + plan de dev parallèle sur integration/v2.4. PRs #418 + #439 retargetées sur la branche d'intégration. Issues #160 + #196 fermées (périmées/superseded). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: sducournau <simon@imago.dev>
…ne_config (#439) * fix(orchestration): scheduled pipelines actually execute their pipeline_config The PipelineScheduler enqueued jobs carrying parameters.pipeline_config (scheduler.py:330) that JobRunner never read — it only resolved rule_ids, and with an empty rule list it returned the input unchanged with status COMPLETED. Every scheduled pipeline "succeeded" while executing zero steps, silently. - JobRunner dispatches on pipeline_config (documented priority over rule_ids, with a warning when both are present). The config goes through the canonical validation path (explicit version==2 guard naming the received version, validate_pipeline_json — same path as POST /pipelines/validate), and fails loudly instead of silently: no runnable steps → FAILED, empty input with no dataset → FAILED. - ScheduledPipeline gains an optional dataset_id (additive: dataclass field, idempotent SQLite ADD COLUMN migration, router schemas, propagation into the enqueued Job) — without it, scheduled jobs ran against an empty GeoDataFrame. - The execution timeout no longer hangs: the ThreadPoolExecutor context manager waited for the stuck task on shutdown; both execution paths now shut down with wait=False on timeout (the lingering-thread limitation is documented, matching the pre-existing rule_ids behaviour). 164 orchestration tests passing (+11 new), ruff clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Erwan Lee Pesle <erpesle@gmail.com> * test: schedules router fake carries the new dataset_id field The router serialisation now reads sp.dataset_id on every schedule object; the test-local _FakeScheduledPipeline lacked the field and turned create/list/get/delete responses into 500s. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Erwan Lee Pesle <erpesle@gmail.com> --------- Signed-off-by: Erwan Lee Pesle <erpesle@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…, SSRF, DoS) + CSV/XLSX write + COG (#418) Implémente les correctifs de l'audit technique du 2026-06-09 (9 lots, fichiers disjoints). Sécurité: - SQLi (HIGH): operation_executor.py + trigger_evaluator.py quotent désormais tous les identifiants interpolés ("schema"."table"), corrigeant l'anti-pattern "validateur permissif + identifiant non quoté" exploitable via ESB->PostGIS. - Auth HTTP (HIGH): filter/catalog montés **protected, ogc **read_protected, marketplace **protected ; marketplace install/uninstall fail-closed (403) quand RBAC non configuré ; /metrics passe à hmac.compare_digest. - read-only middleware: admin key en constant-time + regex allowlist corrigées vers les vrais préfixes /api/filter/... - zip-slip (MEDIUM): validation des membres 7z + ZIP via is_relative_to. - portal upload (MEDIUM): plafond streaming max_upload_mb (413). - portal SQL: DELETE/INSERT/UPDATE/MERGE ajoutés à la blocklist + export read-only. - webhook SSRF (LOW): connexion pinnée sur l'IP validée (anti DNS-rebinding). Fonctionnalités: - Écriture CSV/TSV/XLSX (géométrie en WKT) — corrige aussi le bug d'export CSV du portail qui levait une 500. - Sortie raster COG first-class (driver=COG + overviews), rétro-compatible. Tests: 544 tests ciblés verts (189 + 355), ruff clean sur les 11 fichiers. Signed-off-by: sducournau <simon@imago.dev> Co-authored-by: sducournau <simon@imago.dev> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…ntHub (#440 a+b) (#442) External supervision of pipeline execution (a monitoring SPA, the portal Workflows canvas, automations) had nothing to consume: the only persisted state was the whole-job status, the worker logged completions without broadcasting anything, and the executors emitted a DEBUG line per step. - core/run_models.py: PipelineRun {run_id, source, spec_ref, scope, status, timestamps, error, steps[]} + PipelineRunStep — pure domain dataclasses, re-exported from core/models. - persistence/run_repository.py: SQLite repository following the ScheduleRepository pattern (lock, WAL, idempotent migration, steps as JSON), plus recover_stale_runs() — RUNNING runs orphaned by a worker crash are marked failed at startup and emit run.failed. - orchestration/event_sink.py: RunEventSink protocol + NoOpSink + RecordingSink (single writer: updates and persists the run entity on every event, then delegates to an inner sink). orchestration/ imports nothing from adapters/ — the EventHubSink lives in app.py and broadcasts to the existing /ws/events hub with JSON-safe data. - PipelineExecutor / GraphExecutor emit run.step.started/completed/ failed (keyword-only, no-op default — every existing caller is unchanged); the whole step body sits under the failure guard so capability-lookup/validation errors also produce run.step.failed. - JobWorker creates the run (source=job|schedule), emits run.started/ completed/failed, threads the sink and run_id through JobRunner into both execution paths (rule_ids and pipeline_config); both cancellation paths now terminate the run (FAILED, error=cancelled) instead of leaving it RUNNING forever. - routers/runs_router.py: GET /runs (bounded pagination) + GET /runs/{id}. Scenarios are not wired in this PR: scenarios_router's GraphExecutor construction has a pre-existing signature mismatch on this branch (annotated in place, reported separately); their wiring lands with the trigger follow-up (#440 c). 130 tests across the touched suites, ruff clean. Signed-off-by: Erwan Lee Pesle <erpesle@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…PK, docs drift (#441) Closes the remaining v2.3.0 hardening code items after #418: - #402 pg_notify trigger: cover DELETE (was INSERT/UPDATE only), make the PK column configurable via conditions['pk'] (was hard-coded "id"), support composite keys, and RETURN COALESCE(NEW, OLD) so the function is valid when NEW is NULL on DELETE. - #403 CDC composite PK: the GPKG change-log triggers now journal a composite key as a json_array carrying every column (was silently keeping only the first); the watcher decodes the array to rebuild the full "WHERE a=? AND b=?" row reload. Single-column PKs are byte-identical. - #404 docs drift: README capability count 117 -> 128 (matches the in-sync coverage matrix) and downgrade the Tauri desktop app claim from "Done" to "Beta" (not yet packaged for distribution). Tests: TriggerManager DELETE/custom/composite/unsafe-pk, composite trigger DDL + round-trip, composite watcher reload. 133 targeted tests green, ruff clean. Signed-off-by: sducournau <simon@imago.dev> Co-authored-by: sducournau <simon@imago.dev> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…jwt/urllib3 (#400) (#444) #401 — Supply-chain hardening of CI: - Pin every GitHub Action to a full commit SHA (tag kept as a comment), including the previously-mutable pypa/gh-action-pypi-publish@release/v1. - Add an explicit least-privilege `permissions: contents: read` default to dco.yml (was inheriting the org/repo default token scopes). codeql.yml already scopes permissions at the job level. #400 (Python deps) — bump vulnerable transitive/optional deps in the lock: - pyjwt 2.12.1 -> 2.13.0 (4 PYSEC advisories) - urllib3 2.6.3 -> 2.7.0 The JS side of #400 (react-router, fast-xml-parser, shadcn out of prod deps) lives in the gispulse-portal repo — tracked as a follow-up there. Workflows still parse (yaml.safe_load), 129 licence/auth/Ed25519 tests green. Signed-off-by: sducournau <simon@imago.dev> Co-authored-by: sducournau <simon@imago.dev> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…n wiring (#440 c, fixes #443) (#445) Event-driven chaining between runs: "when the ingest run for scope X completes, enqueue the build for X" is now expressible. - New TriggerType.ON_RUN_COMPLETED with OnRunCompletedConditions {status, source, spec_ref, scope, max_depth} — declared as an ordinary Trigger, evaluated by the existing TriggerEvaluator and dispatched through the existing TriggerJobBridge (no parallel trigger system). - RunCompletionTriggerSink (orchestration/, no adapters import) decorates any RunEventSink: on run.completed/run.failed it builds a synthetic ChangeRecord, evaluates triggers, and enqueues the fired jobs. Dispatch covers all calling contexts (loop thread, external sync thread via run_coroutine_threadsafe with the lifespan-bound loop, ad-hoc loop) and never discards silently — the no-loop case logs an explicit warning. Enqueue failures are observed via done callbacks and never affect the original run event. - Loop containment proven end to end: PipelineRun carries depth (idempotent column migration), the worker seeds it from the triggering job's parameters, every terminal event embeds {depth, source, spec_ref, scope}, and the evaluator blocks at max_depth — tested with a self-triggering chain (3 re-triggers, then a logged block). - Scenarios wired: run_scenario and run_single_node produce PipelineRuns (source=scenario) through the same RecordingSink plumbing; validation rejections (404/422) deliberately produce no run — a run exists only once execution starts. Fixes the pre-existing GraphExecutor(rule_repo=...) construction (#443) with a test that builds the real executor. 134 tests across the touched suites, ruff clean. Signed-off-by: Erwan Lee Pesle <erpesle@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…) (#446) First building block of the web-mapping editor EPIC (#409): a persistent SavedMap entity and its REST CRUD, the socle that publication (#406), MVT tiles (#407) and view stats (#408) build on. - core/models.py: `SavedMap` dataclass (layers list + per-layer styles/ filters dicts + view dict + basemap + optional project_id), mirroring the Project/Scenario convention (id + created_at/updated_at). - persistence: register `saved_maps` in _TABLE_DEFS (+ JSON columns layers/styles/view/filters, UUID column project_id), bump SCHEMA_VERSION 3 -> 4, and wire SavedMap into the generic SQLite + GPKG repositories (no per-entity DAO — the reflection-based serializer handles it). The GPKG `_gispulse_saved_maps` table is created by bootstrap automatically. - adapters/http: new saved_maps_router (POST/GET list+filter/GET/PUT/ DELETE under /maps), get_saved_map_repo dependency, repo wired on app.state in both storage branches, router mounted in portal + full modes (**protected, like projects/scenarios). Styles are stored as style-def dicts compatible with style_converter.style_def_to_qml so a saved map's layers can later be exported to QML/SLD unchanged. Tests: 16 router tests (full-composition round-trip, project_id filter, pagination, 404/422 paths) + SQLite/GPKG repo round-trips. 698 HTTP/app regression + 622 persistence regression green, ruff clean. Signed-off-by: sducournau <simon@imago.dev> Co-authored-by: sducournau <simon@imago.dev> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ve 3) (#447) run_manifest() was Python/CLI-only: an external platform could not launch a declarative pipeline. Manifest execution now rides the same job path as everything else — queue, worker, retries, PipelineRun, lifecycle events, cancellation and completion triggers all come for free. - JobRunner gains a third dispatch mode: parameters.manifest (documented priority manifest > pipeline_config > rule_ids, warning on ambiguity). Sources load through the canonical universal loader (persistence.loader.load — local/S3/HTTP/WFS/DuckDB) keyed by each SourceSpec's uri/layer; memory:// falls back to the job input. The empty-input guard stays on the pipeline_config path only — self-loading manifests need no dataset_id. - run_manifest() propagates event_sink/run_id down to PipelineExecutor, closing the gap noted in #442: manifest steps now emit run.step.* like every other entry point. - New manifests_router: POST /manifests/run → 202 {job_id} and POST /manifests/validate → 200 — both through one canonical validation that also checks compiled capabilities exist (parity with /pipelines/validate). materialize: incremental fails explicitly. - POST /jobs rejects reserved orchestration keys (manifest, pipeline_config, trigger_depth) with a 422 pointing at the right door — internal paths (scheduler, trigger bridge) enqueue directly and are unaffected. Closes the auth-boundary bypass. 26 manifest tests, 123 across the touched suites, ruff clean. Signed-off-by: Erwan Lee Pesle <erpesle@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…es (#449) Manifest sources load through persistence.loader.load(), which required a geometry column — attribute-only sources (the code_insee join family: market transactions, permits, risks) were inexpressible in a manifest. load() gains geometry: bool | None: - True (the unchanged public default — an existing caller never silently receives a different return type), None (AUTO: structural geo-metadata check on the parquet footer via pyarrow, targeted fallback to pandas for genuinely geometry-less files — corruption still raises), False (direct tabular: pd.read_parquet / CSV through the core encoding cascade). The manifest source_loader opts into AUTO explicitly. SourceResult re-reads propagate the same mode. - Tabular models materialize for real: DuckDBSession.register() dispatches plain DataFrames through DuckDB's native Arrow bridge (no WKB path); a tabular source declaring capability transform steps fails explicitly instead of silently skipping them. - runner.py imports run_manifest lazily again: the cycle manifest_runner → orchestration.event_sink → orchestration → runner is real since #442 (commented in place; two wave-3 tests re-targeted their patches accordingly). 26 loader-tabular tests; 69 across the touched suites; persistence suite 170 passed; ruff clean. Signed-off-by: Erwan Lee Pesle <erpesle@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…440 wave 4) (#450) Implements design issue #448 — the contract that lets long-running external work (dbt builds, tile exports) run as first-class pipeline steps, observable and cancellable like any capability step. - Step-kind registry (orchestration/step_kinds.py): register_step_kind, StepContext {run_id, step_id, scope, event_sink, cancel_check, heartbeat, emit_progress}, StepResult {status, artifacts, metrics, error}. StepSpec.kind="capability" default — fully additive. - Built-in "external" kind (orchestration/external_step.py): argv-only (no shell), process group via start_new_session, cooperative cancel (SIGTERM then SIGKILL after 5 s grace), heartbeat every 25 s wired to the worker stuck-recovery, log tail capped at 64 KiB with [truncated] marker, GISPULSE_SKIP_MARKER captured (last occurrence wins, marker lines filtered from the tail), run.step.progress events. - Per-step timeouts: effective job timeout = max(job_timeout, sum(non-capability timeout_seconds) + 60 s) — a step declaring timeout_seconds=14400 is no longer killed by the 300 s job default; unchanged when no non-capability step declares one. - Built-in kinds auto-registered via idempotent _ensure_builtin_kinds() at dispatch time — no import-order dependency in production. - DAG mode dispatches non-capability steps in topological order before delegating capability steps to GraphExecutor. - validate_step_kind_inputs() wired into the canonical validation path: a capability step depending on a non-capability step is rejected at compile time (no GeoDataFrame flows out of an external step). - PipelineRunStep.artifacts persisted (run repository + GET /runs). Tests: tests/unit/test_step_kinds.py (fresh-subprocess registration, DAG kind dispatch, timeout elevation end-to-end, skip-marker semantics, log-tail byte cap, worker loop-closed guard) — 94 passed, 2 skipped across the orchestration suites; ruff check clean. Codex pre-commit review: 6 findings (3 P1, 3 P2) — all fixed, trail on the PR. Refs #440, closes #448. Signed-off-by: Erwan Lee Pesle <erpesle@gmail.com>
…ecution (#440 wave 5) (#452) Implements design issue #451 — runs become pilotable, not just observable: a consumer (portal Scenarios, cockpit) can stop a run, resume a failed one from where it stopped, and execute a subset of a pipeline. Cancel — POST /runs/{run_id}/cancel: - PipelineRun gains job_id (idempotent SQLite migration), set by the worker at run creation. The endpoint resolves run -> job_id and delegates to the existing job_queue.cancel mechanism — one cancel path, no second state writer (the worker cancel_check -> terminal event -> RecordingSink owns the FAILED error="cancelled" transition). - 202 on accept; machine-readable 404/409 (terminal, no backing job, no queue, job no longer cancellable — queue result is checked). Resume — POST /runs/{run_id}/resume: - Creates a new job copying the origin job's parameters plus resume_from_run_id (reserved key, 422 on POST /jobs). Lineage persisted as PipelineRun.resumed_from_run_id. - Skip-vs-replay contract: non-capability steps COMPLETED in the source run are skipped (replicated in the new run with skipped_resume=true artifacts + events — the graph stays complete) because their side effects persist outside the process; capability steps are always re-executed — their in-memory GeoDataFrame output does not survive the source run, skipping them would silently corrupt downstream data. - Per-step skip_marker from the source run (FAILED steps included) is injected via StepContext.resume_marker; the external kind exposes it to the subprocess as GISPULSE_RESUME_MARKER. - Source run missing at execution time -> explicit failure (RESUME_SOURCE_RUN_NOT_FOUND), never a silent resume-from-scratch. - Wired on both execution paths: pipeline_config and manifest (compile v3 -> replay on the flat spec -> filtered execution). Partial — steps filter: - POST /manifests/run accepts steps: [step_id, ...] (and the pipeline_config path accepts parameters.steps_filter). Validation at both boundaries (422 at POST, machine-readable error at runtime): unknown ids; capability step whose input is outside the subset; an included model referencing — via select OR with:/ref_layer — an excluded model that has capability steps (EXCLUDED_CAPABILITY_UPSTREAM). - Excluded models NEVER execute (no silent subprocess runs); they materialize their resolved input as passthrough so downstream refs resolve. PipelineRun.steps_filter persisted and exposed on GET /runs. Also fixes the fresh-process registration test from #450 which hardcoded a worktree path (now derives the repo root from __file__). Tests: tests/unit/test_run_control.py (44 tests) — 244 passed, 2 skipped across orchestration+manifest+scenario suites; ruff clean. Codex pre-commit review: 5 findings (2 P1, 3 P2), all fact-checked true and fixed — trail on the PR. Refs #440, closes #451. Signed-off-by: Erwan Lee Pesle <erpesle@gmail.com>
…t v3 (#440 wave 6 prereq) (#454) Implements design issue #453 — the manifest v3 (the only HTTP command surface, POST /manifests/run) can now express non-capability steps, unlocking app orchestrator migrations (wrap-then-replace). - Transform items accept a reserved `kind` key: `{shell_pipeline: {kind: external, argv: [...], timeout_seconds: 21600}}` compiles to StepSpec(kind="external", type="external", capability=""). Explicit over implicit: only the `kind` key switches dispatch, no name magic. kind must be a non-empty string != "capability" — non-string or empty values are rejected at validation, never silently normalised. - ModelSpec.select becomes optional, ONLY when every transform item is non-capability (an opaque subprocess chain has no data input — requiring a no-op source would be a declarative lie). A capability step without select stays a validation error. Selectless models execute their chain with no primary input, are not materialized, and a downstream model consuming one fails with an explicit "produces no data output" error (checked before the engine/loader pre-check so the actionable message wins). - `with:` on a non-capability item is rejected (no data flows into an external step). - /manifests/validate validates structure only for non-capability kinds: app kinds are registered in the worker process, validating their existence at the HTTP boundary would 422 on valid manifests; the worker fails explicitly with "unknown step kind" at execution. - Wave-5 interactions hardened: sub-pipeline compilation propagates step kind (was lost, breaking non-capability detection in validate_steps_filter_models); manifest resume with nothing left to execute returns without re-running the subprocess (empty filter no longer collapses to "no filter"); models excluded by steps_filter are not reported in execution_order. Tests: test_manifest_external_steps.py (32) + test_manifest_kinds_fixes.py (16) — 238 passed, 2 skipped across manifest+orchestration suites; ruff check clean. Codex pre-commit review: 4 findings (1 P1: empty resume filter re-executing everything), all fixed — trail on the PR. Refs #440, closes #453. Signed-off-by: Erwan Lee Pesle <erpesle@gmail.com>
…nifest path (#440) (#456) Two bugs found during the live phase-A validation of the foncier migration (VPS) — both invisible to the unit suites because the end-to-end cancel/timeout tests exercised the pipeline_config path: - POST /runs/{id}/cancel returned 202 but the external subprocess kept running: run_manifest built its per-model PipelineExecutor without cancel_check/heartbeat. Manifest jobs (the cockpit command surface) were not cancellable mid-step and never heartbeat during long external steps. Fix: cancel_check/heartbeat parameters on run_manifest (both executor sites), threaded from JobRunner.run through _execute_manifest. - Per-step timeout elevation (#448) was not applied on the manifest path: a step declaring timeout_seconds=21600 was killed by the 300 s job default ("Job timed out after 300s" observed live). Fix: _compute_effective_timeout applied to the compiled flat spec in _execute_manifest, same formula as the pipeline_config path. Tests: tests/unit/test_manifest_cancel.py — cancel kills the subprocess fast (RuntimeError asserted specifically so a signature mismatch TypeError cannot pass as a cancel), heartbeat propagation (shrunk interval), backward compat, end-to-end JobRunner cancel, timeout elevation end-to-end (job timeout 1 s + step 30 s + sleep 3 s → COMPLETED). 200 passed across the manifest+orchestration suites, ruff clean. Refs #440, #451. Signed-off-by: Erwan Lee Pesle <erpesle@gmail.com>
Found in the live B-lite validation of the foncier migration: a manifest declaring stage -> build_core -> build_finalize (selectless external models, no inter-model edges) executed build_finalize BEFORE build_core — the finalize dbt phase against a stale scratch would produce silently wrong data. run_manifest collapsed model names into a set() before the topological sort; the sort itself is stable on input order for zero-in-degree nodes, so the fix is to feed it the declaration order (list of the models dict). This honours the same contract the compile path (manifest_v3._topo_models) already implements, documented in #455. Test: 12 selectless external models declared in shuffled name order — asserts both the reported execution_order and the REAL subprocess execution order (marker file appended by each step). Refs #440, #455. Signed-off-by: Erwan Lee Pesle <erpesle@gmail.com>
…izip (#459) Deux sources open data publiques + l'extension fetch qui les rend déclaratives. - core/fetchers/http_file.py : `_resolve_vsi_uri` — lit un membre .shp d'un .zip distant via `/vsizip//vsicurl/<url>/<member>` (param `archive_member`), scan lazy ET materialize (local Parquet + S3/Garage) ; chemin existant inchangé sans member. - plugins/gispulse-src-osm : routes Geofabrik (.shp.zip → membre roads). Schéma réel du shapefile gratuit (osm_id/code/fclass/.../layer ; PAS de surface). - plugins/gispulse-src-grb : GRB Flandre WFS (WBN chaussée + WGA accotements), EPSG:31370 natif — source de classification de surface (BOM). Review stratégique Codex passée (3 findings corrigés : schéma code/layer, materialize local .zip → Parquet, branche GRB simplifiée). Vérifs runtime Codex : ST_Read /vsizip/ réel OK, GRB GetFeature OK. 26 tests, ruff clean. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
H3AggregateCapability.execute gains an optional `aggregations` mapping
{out_name: (column|None, func)} computing several metrics (e.g. count +
sum) in ONE pass — a single latlng_to_cell and a single cell_to_boundary,
instead of one full pass per metric. Backward compatible: without
`aggregations`, the agg_column/agg_func API keeps its exact behaviour
(`value` column, lenient missing-column fallback).
Explicit multi-metric specs are validated up front: a missing source
column raises (no silent count where a sum was asked); an empty mapping
raises. New tests cover back-compat, count-via-size, the single-pass
multi-metric path, and both validation errors. Test wired into the
`plugins` CI job (h3 installed) with importorskip for the engine-only job.
Signed-off-by: Erwan Lee Pesle <erpesle@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Erwan Lee Pesle <erpesle@gmail.com> Co-authored-by: Codex <codex@openai.com>
Signed-off-by: Erwan Lee Pesle <erpesle@gmail.com> Co-authored-by: Codex <codex@openai.com>
Expose materialize_pbf(dest, *, force) in gispulse-src-osm: materialises the declared osm-pbf-be extract to a raw local .osm.pbf via the core DOWNLOAD fetcher (HttpFileFetcher), idempotent. Consumed by OSRM (osrm-extract) and the surface tag resolver (read_pbf_roads). No bespoke HTTP client; URL comes from the declared AccessSpec. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…abilities (#465) Faithful pure-shapely/GeoPandas port of the 8 processing algorithms from the QGIS Consolidate Networks plugin (github.com/sducournau/consolidate_networks) into backend-independent GISPulse capabilities — usable from CLI, MCP, portal and the DuckDB/PostGIS engine without QGIS: - cn_calculate_dbscan (DBSCAN over points sampled along lines) - cn_consolidate_with_dbscan (snap endpoints across clusters) - cn_make_intersections_vertexes (insert missing intersection vertices) - cn_endpoints_trim_extend (trim/extend endpoints, angular+Hausdorff) - cn_endpoints_snapping (snap endpoints with angular preferences) - cn_hub_snapping (collapse nearby vertices onto a hub) - cn_snap_hubs_to_layer (snap hubs to a reference layer) - cn_snap_endpoints_to_layer (snap endpoints to a reference layer) Shared helpers reproduce the QGIS pipeline (fixgeometries, multiparttosinglep., explodelines, dissolve, extendLine, hausdorff/angular filters). Registered in the capability registry loader (136 caps total). +14 unit tests, ruff clean. Signed-off-by: sducournau <simon@imago.dev> Co-authored-by: sducournau <simon@imago.dev>
Bump pyproject + qgis_plugin metadata to 2.3.0 (lockstep) and write the 2.3.0 CHANGELOG covering the work merged on integration/v2.4 since v2.2.3: manifest v3 orchestration (#440), saved-map API (#405), consolidate-networks cn_* capabilities (#465), new source plugins, security audit fixes (#418), CDC hardening (#441), Python 3.12 baseline. Signed-off-by: sducournau <simon@imago.dev> Co-authored-by: sducournau <simon@imago.dev>
Add an `id_rnb` parameter to `DpeSource.access_for` that builds an `id_rnb:(A OR B)` Lucene filter, letting consumers fetch the diagnostics of specific RNB buildings instead of a whole commune's table. RNB ids are nationally unique, so this pins the query to exactly those buildings — turning a commune-wide fetch (up to 100k rows / 600s on a big city) into a handful of rows, the cheap way to attach a DPE to a known parcel. Validates each id (alphanumeric) to keep the qs free of injection; id_rnb takes precedence over code_insee, then code_departement. Adds unit tests. Claude-Session: https://claude.ai/code/session_01Pcn8PKwVjfgRcybmbM4kxU Signed-off-by: Erwan Lee Pesle <erpesle@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… road routing (#484) * feat(capabilities): add network_greedy_expansion + cluster_balanced_kmeans Two capabilities ported from an internal fibre-network engine: - network_greedy_expansion (Pro): greedy multi-source Prim-style absorption over a line network, with a one-off per-node activation cost on top of the edge weight. Deterministic tie-break, NaN-cost fast-fail (inf allowed), frontier by exact node identity, optional activation-cost layer snapped to nearest node. - cluster_balanced_kmeans (Community): size-bounded k-means (k-means++ / Lloyd + split/merge rebalance), pure numpy, seeded; fails loudly when [min_size, max_size] is infeasible. Docs FR/EN updated (tables + section counts) and capability coverage matrix regenerated (138 capabilities). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: sducournau <simon@imago.dev> * feat(capabilities): add disjoint_paths (Suurballe) + network_bridges (Tarjan) Two network-resilience primitives ported from the graph core of an internal fibre-network engine (SPOF audits / protection proofs), stripped of business logic: - disjoint_paths (Pro): k node- or edge-disjoint paths of minimum total cost between two points — Suurballe / successive shortest paths with Johnson potentials on a split-node residual graph. paths_found < k is the SPOF signal (column), not an error. Finds pairs a naive remove-first-path-then-retry scan provably misses. - network_bridges (Pro): tags every line whose removal disconnects its component (cut-edge / structural SPOF), iterative Tarjan with per-edge identity so parallel lines are never bridges. Docs FR/EN + coverage matrix regenerated (140 capabilities). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: sducournau <simon@imago.dev> * feat(routing): road-routing providers + route_pairs capability Port of an internal fibre-network engine's routing layer (its ADR-01 RoutingProvider abstraction), genericized — no hardcoded CRS, no business config: - core/routing_providers.py: RoutingProvider protocol, Tortuosity (offline detour-factor bands), OSRM over httpx (/route + /table batch, degenerate-drop flooring to the tortuosity bands, thread-safe drop telemetry), CachedRoutingProvider (pre-routed GeoParquet, canonical direction-independent pair keys, read-side repair of degenerate traces, provenance of baked fallbacks). Machine-readable RoutingError(code, context). - route_pairs capability (Pro): routes point pairs row-by-row against any of the three providers; on_no_route='skip' drops only genuinely unroutable pairs, infrastructure failures always raise. Docs FR/EN + coverage matrix regenerated (141 capabilities). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: sducournau <simon@imago.dev> --------- Signed-off-by: sducournau <simon@imago.dev> Co-authored-by: sducournau <simon@imago.dev> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…s, network_redundancy + resilience template (#485) * feat(routing): calibrate_detour_bands + sample_surface_along_lines Two more ports from the internal fibre-network engine, closing the road-routing loop: - calibrate_detour_bands (Pro): recalibrates route_pairs' detour factors from routed observations — median routed/straight ratio per band, bounds preserved, bands without observations keep their current factor. applied_factor feeds straight back into tortuosity_bands. Port note: the source assigned observations with an exclusive upper bound while its provider selected factors with an inclusive one; the port aligns both on the provider's inclusive rule. - sample_surface_along_lines (Pro): linear referencing — splits every line into ordered homogeneous segments by the surface class it crosses (length_m, share, sub-line geometry). Overlaps resolved by layer order or an explicit priority list (unlisted classes deliberately outrank listed ones). Docs FR/EN + coverage matrix regenerated (143 capabilities). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: sducournau <simon@imago.dev> * feat(capabilities): network_redundancy + resilience/expansion pipeline template - network_redundancy (Pro): per-site redundancy audit — counts the disjoint routes (capped at k) from every point to a facility set through a line network: 0 = unreachable, 1 = SPOF, k = protected. Same Suurballe engine as disjoint_paths; facilities grouped per connected component, co-located sites memoized. This is the generic core of the fibre engine's per-site protection counting. - reseau_expansion_resilience template (v2): first pipeline composing the ported capabilities end-to-end — connected_components → network_bridges → network_redundancy → SPOF filter → network_greedy_expansion. Registered in templates/manifest.yml + INDEX.md; templates index rebuilt (22 presets). Docs FR/EN + coverage matrix regenerated (144 capabilities). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: sducournau <simon@imago.dev> --------- Signed-off-by: sducournau <simon@imago.dev> Co-authored-by: sducournau <simon@imago.dev> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…component (#486) Mehlhorn (networkx's default steiner heuristic since 3.2) runs a multi_source_dijkstra from the terminals then indexes EVERY node of the graph; a component with no terminal — common in a raw OSM road network — is unreachable from all sources and raises KeyError. Restrict the solve to the terminals' connected component (already computed for the connectivity guard). Unchanged for a fully connected network. Adds a discriminating regression test. Claude-Session: https://claude.ai/code/session_01R96nGzo5mNi732BYduWwfT Signed-off-by: superWorldSavior <erpesle@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Promote the Unreleased entry (DPE id_rnb scoping #475, MILOU network capabilities #484/#485, steiner_tree fix #486) to 2.4.0 and bump the lockstep version markers (pyproject.toml, qgis_plugin/metadata.txt). Also corrects the stale 128/118-capability counts in README.md and the capabilities.md front matter to the current total of 144 — those two lines aren't covered by the capability-matrix-drift CI gate, which only checks docs-site/guide/coverage.md. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012fSzat3uvvBddR4h2ifCny Signed-off-by: sducournau <simon@imago.dev>
The docs-site changelog mirror was last updated for 2.2.3; the 2.3.0 release (PR #466) never got its mirror commit, and the docs-gate "changelog covers version" check only looks at the current pyproject.toml version, so the gap went unnoticed until this PR. Backfills 2.3.0 and adds 2.4.0 in both languages. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012fSzat3uvvBddR4h2ifCny Signed-off-by: sducournau <simon@imago.dev>
imagodata
force-pushed
the
integration/v2.4
branch
from
September 12, 2026 10:42
626dcf6 to
0a2c6bf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Merges the
integration/v2.4branch intomainfor the 2.4.0 release:id_rnb(feat(src-dpe): scope DPE query by id_rnb (Lucene qs) #475) — commune-wide fetch → a handful of rows for known RNB buildingsnetwork_greedy_expansion,cluster_balanced_kmeans,disjoint_paths,network_bridges(feat(capabilities): network expansion, resilience, balanced k-means & road routing #484)calibrate_detour_bands,sample_surface_along_lines,network_redundancy+reseau_expansion_resiliencetemplate (feat(capabilities): calibrate_detour_bands, sample_surface_along_lines, network_redundancy + resilience template #485)route_pairscapability +gispulse.core.routing_providers(Tortuosity / OSRM / Cached providers)steiner_treeKeyErroron a graph with a terminal-less component (fix(capabilities): steiner_tree KeyError on graph with terminal-less component #486)## [2.4.0], version bumped inpyproject.toml+qgis_plugin/metadata.txt, stale 118/128-capability counts corrected to 144 in README.md and capabilities.md144 capabilities total after this release (was 128 at 2.3.0 doc time / 144 already true in the registry).
Test plan
git merge-treedry run against currentmain— 0 conflictsv2.4.0, letrelease.ymlpublish to PyPI + create the GH Release🤖 Generated with Claude Code
https://claude.ai/code/session_012fSzat3uvvBddR4h2ifCny